export default {
  tree_allinone_product: {
    _odoo_model: 'ir.ui.view',
    model: 'product.product',
    type: 'tree',

    fields: {
      name: {},
      default_code: {},
      company_id: {}
      // barcode: {},
      // list_price: {},
      // standard_price: {},
      // categ_id: {},
      // detailed_type: {},
      // uom_id: {},
      // spec: {},
    }
  },

  form_allinone_product: {
    _odoo_model: 'ir.ui.view',
    model: 'product.product',
    type: 'form',

    fields: {
      name: {},
      default_code: {},
      // barcode: {},
      company_id: {},
      list_price: {},
      standard_price: {},
      categ_id: {
        required: 1,
        domain: [['group', '=', 'fapiao_allinone']]
      },
      // categ_code: {},
      detailed_type: {},
      uom_id: {}
      // spec: {}
    }
  },

  action_allinone_product: {
    _odoo_model: 'ir.actions',
    name: '商品',
    type: 'ir.actions.act_window',
    res_model: 'product.product',
    domain: [['categ_id.group', '=', 'fapiao_allinone']],
    context: { categ_id_group: 'fapiao_allinone' },
    views: {
      tree: 'tree_allinone_product',
      form: 'form_allinone_product'
    }
  }
}
